/* 应用主容器 */
#root {
  width: 100%;
  min-height: 100vh;
  background-color: var(--apple-gray-1);
}

/* 应用布局容器 */
.app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 主内容区域 */
.main-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* 页面容器 */
.page-container {
  background-color: var(--apple-white);
  border-radius: var(--apple-radius-xl);
  padding: 2rem;
  box-shadow: var(--apple-shadow-small);
  min-height: calc(100vh - 3rem - 4rem);
}

/* 标题区域 */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--apple-gray-2);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--apple-gray-9);
  margin: 0;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* 统计卡片 */
.stat-card {
  background-color: var(--apple-white);
  border-radius: var(--apple-radius-large);
  padding: 1.5rem;
  box-shadow: var(--apple-shadow-small);
  transition: all var(--apple-transition-normal);
  border-left: 4px solid var(--apple-blue);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--apple-shadow-medium);
}

.stat-card h3 {
  font-size: 1rem;
  color: var(--apple-gray-6);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--apple-gray-9);
  margin: 0;
}

.stat-card .trend {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-card .trend.positive {
  color: var(--apple-green);
}

.stat-card .trend.negative {
  color: var(--apple-red);
}

/* 导航栏样式 */
.navbar {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--apple-gray-2);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--apple-gray-9);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-link {
  color: var(--apple-gray-7);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--apple-transition-fast);
  padding: 0.5rem 0;
}

.navbar-link:hover,
.navbar-link.active {
  color: var(--apple-blue);
}

/* 侧边栏样式 */
.sidebar {
  width: 280px;
  background-color: var(--apple-white);
  border-right: 1px solid var(--apple-gray-2);
  padding: 1.5rem;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-item {
  margin-bottom: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--apple-radius-medium);
  color: var(--apple-gray-7);
  text-decoration: none;
  transition: all var(--apple-transition-fast);
  font-weight: 500;
}

.sidebar-link:hover {
  background-color: var(--apple-gray-1);
  color: var(--apple-gray-9);
}

.sidebar-link.active {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
}

/* 表单组 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--apple-gray-8);
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* 状态标签 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--apple-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.success {
  background-color: rgba(52, 199, 89, 0.1);
  color: var(--apple-green);
}

.status-badge.warning {
  background-color: rgba(255, 204, 0, 0.1);
  color: var(--apple-yellow);
}

.status-badge.error {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--apple-red);
}

.status-badge.info {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .page-container {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .page-container {
    padding: 1.25rem;
    border-radius: var(--apple-radius-large);
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--apple-gray-2);
  }
}

@media (max-width: 480px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group button {
    width: 100%;
  }
}
